<?php

require_once ('BaseService.php');
Loader::using("models::entities::HistorialLaboral");

//DONE.
/**
 * @author Virtualidad
 * @version 1.0
 * @created 29-dic-2010 09:57:49 a.m.
 */
class EgresadosService extends BaseService {

    /**
     *
     * @param int $Id
     * @return <type>
     */
    public function GetById($Id) {
        $response = parent::invokeService("GetById", $Id);
        Loader::using("models::entities::Egresados");
        $result = parent::processSingleObjectResponse($response, parent::getMimeType(), "Egresados", Egresados::MAPPING());
        return $result;
    }

    public function GetByIdentificacion($Identificacion) {
        $response = parent::invokeService("GetByIdentificacion", $Identificacion);
        Loader::using("models::entities::Egresados");
        $result = parent::processSingleObjectResponse($response, parent::getMimeType(), "Egresados", Egresados::MAPPING());
        return $result;
    }

    public function Update($Egresado) {
        $response = parent::invokeService("Update", $Egresado);
        $data = $encoder->serialize($Egresado);

        $result = parent::invokeService("AddHistorialLaboral", $data);
        return $result;
    }

    public function GetInformacionLaboralById($InfoLaboral) {
        $encoder = parent::getSerializer(parent::getMimeType(), "HistorialLaboral");
        $data = $encoder->serialize($InfoLaboral);
        $response = parent::invokeService("GetInformacionLaboralById", $data);

        Loader::using("models::entities::HistorialLaboral");
        $result = parent::processSingleObjectResponse($response, parent::getMimeType(), "HistorialLaboral", HistorialLaboral::MAPPING());
        return $result;
    }

    public function AddInformacionLaboral($InfoLaboral) {
        $encoder = parent::getSerializer(parent::getMimeType(), "HistorialLaboral");
        $data = $encoder->serialize($InfoLaboral);
        $response = parent::invokeService("AddInformacionLaboral", $data);
        return $response;
    }

    public function EditInformacionLaboral($InfoLaboral) {
        $encoder = parent::getSerializer(parent::getMimeType(), "HistorialLaboral");
        $data = $encoder->serialize($InfoLaboral);
        $response = parent::invokeService("EditInformacionLaboral", $data);
        return $response;
    }

    public function DeleteInformacionLaboral($InfoLaboralPk) {
        $encoder = parent::getSerializer(parent::getMimeType());
        $data = $encoder->serialize($InfoLaboralPk);
        $response = parent::invokeService("DeleteInformacionLaboral", $data);
        return $response;
    }

    public function AddInformacionAcademica($InfoAcademico) {
        $encoder = parent::getSerializer(parent::getMimeType(), "HistorialAcademico");
        $data = $encoder->serialize($InfoAcademico);
        $response = parent::invokeService("AddInformacionAcademica", $data);
        return $response;
    }

    public function EditInformacionAcademica($InfoAcademico) {
        $encoder = parent::getSerializer(parent::getMimeType(), "HistorialAcademico");
        $data = $encoder->serialize($InfoAcademico);

        $response = parent::invokeService("EditInformacionAcademica", $data);
        return $response;
    }

    public function DeleteInformacionAcademica($InfoAcademico) {
        $encoder = parent::getSerializer(parent::getMimeType());
        $data = $encoder->serialize($InfoAcademico);
        $response = parent::invokeService("DeleteInformacionAcademica", $data);
        return $response;
    }

    public function GetInformacionAcademicaById(HistorialAcademicoPk $InformacionAcademicaPk) {
        $encoder = parent::getSerializer(parent::getMimeType(), "HistorialAcademico");
        $data = $encoder->serialize($InformacionAcademicaPk);
        $response = parent::invokeService("GetInformacionAcademicaById", $data);
        Loader::using("models::entities::HistorialAcademico");
        $result = parent::processSingleObjectResponse($response, parent::getMimeType(), "HistorialAcademico", HistorialAcademico::MAPPING());
        return $result;
    }

    public function GetInformacionAcademicaByCodigoInterno($CodigoInterno) {
        $data = $CodigoInterno;
        $response = parent::invokeService("GetInformacionAcademicaByCodigoInterno", $data);

        Loader::using("models::entities::HistorialAcademico");
        $result = parent::processArrayResponse($response, parent::getMimeType(), "HistorialAcademico", HistorialAcademico::MAPPING());

        return $result;
    }

    public function AddHijos(Hijos $Hijo) {
        $encoder = parent::getSerializer(parent::getMimeType());
        $data = $encoder->serialize($Hijo);
        $response = parent::invokeService("AddHijos", $data);
        return $response;
    }

    public function EditHijos(Hijos $Hijo) {
        $encoder = parent::getSerializer(parent::getMimeType());
        $data = $encoder->serialize($Hijo);
        $response = parent::invokeService("EditHijos", $data);
        return $response;
    }

    public function DeleteHijos(HijosPk $HijoPk) {
        $encoder = parent::getSerializer(parent::getMimeType());
        $data = $encoder->serialize($HijoPk);
        $response = parent::invokeService("DeleteHijos", $data);
        return $response;
    }

    public function GetHijosByCodigoInterno($CodigoInterno) {
        $response = parent::invokeService("GetHijosByCodigoInterno", $CodigoInterno);
        Loader::using("models::entities::Hijos");
        $result = parent::processArrayResponse($response, parent::getMimeType(), "Hijos", Hijos::MAPPING());
        return $result;
    }

    public function GetIdiomaById(ManejoIdiomasPk $pk) {
        $encoder = parent::getSerializer(parent::getMimeType());
        $data = $encoder->serialize($pk);
        $response = parent::invokeService("GetIdiomaById", $data);
        Loader::using("models::entities::ManejoIdiomas");
        $result = parent::processSingleObjectResponse($response, parent::getMimeType(), "ManejoIdiomas", ManejoIdiomas::MAPPING());
        return $result;
    }

    public function AddIdiomas(ManejoIdiomas $Idioma) {
        $encoder = parent::getSerializer(parent::getMimeType());
        $data = $encoder->serialize($Idioma);
        $response = parent::invokeService("AddIdiomas", $data);
        return $response;
    }

    public function EditIdiomas(ManejoIdiomas $Idioma) {
        $encoder = parent::getSerializer(parent::getMimeType());
        $data = $encoder->serialize($Idioma);

        $response = parent::invokeService("EditIdiomas", $data);
        return $response;
    }

    public function DeleteIdiomas(ManejoIdiomasPk $Idioma) {
        $encoder = parent::getSerializer(parent::getMimeType());
        $data = $encoder->serialize($Idioma);
        $response = parent::invokeService("DeleteIdiomas", $data);

        return $response;
    }

    public function GetIdiomasByCodigoInterno($CodigoInterno) {
        $response = parent::invokeService("GetIdiomasByCodigoInterno", $CodigoInterno);
        Loader::using("models::entities::ManejoIdiomas");
        $result = parent::processArrayResponse($response, parent::getMimeType(), "ManejoIdiomas", ManejoIdiomas::MAPPING());
        return $result;
    }

    public function getServiceClass() {
        return "Egresados";
    }

}

?>